#!groovy

@Library("sharelib@master") _ 

String stackName = "${env.test}"

def tools = new org.devops.tools()
def file = libraryResource 'deploy.yaml'

hello()
hello.sum(1,2)

pipeline{
   agent any
   
   stages{
       stage("Deploy"){
            steps{
                script{
                    //获取版本文件
                    stack = "${stackName}".toLowerCase()
                    println(stack)
                    tools.myPrint("test OK")
                }  
           }
       }
       stage("getcode"){
           steps{
               script{
                    
                    println(file)
                    hello()
               }
           }
       }
    }

    post {
        always{
            script{
                println("always")
            }
        }
        success{
            script{
                println("success")
            }
        }
        failure{
            script{
                println("failure")
            }
        }
        aborted{
            script{
                println("aborted")
            }
        }
    }
}
